<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class ArticleClass extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('article_class', function (Blueprint $table) {
            $table->increments('ac_id',10);
            $table->string('ac_code',20)->nullable()->comment('分类标识码');
            $table->string('ac_name',100)->comment('分类名称');
            $table->integer('ac_parent_id')->default(0)->comment('父id')->unique();
            $table->tinyInteger('ac_sort')->default(100)->comment('排序');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('article_class');
    }
}
